#ifndef MAPLL_H
#define MAPLL_H

/* only positive keys are allowed (k > 0).
   Zero returned as a value for the absent key.
   Thus _put(any_key, 0) is prohibited too. */

typedef void* mapll_t;

mapll_t mapll_create(int capacity); /* put & get time: ~517 nanoseconds */
int64 mapll_get(mapll_t m, int64 k);
bool mapll_put(mapll_t m, int64 k, int64 v);
int64 mapll_remove(mapll_t map, int64 key);
int mapll_size(mapll_t m);
void mapll_foreach(mapll_t map, void (*each)(mapll_t, int64, void*), void* rt); /* it is OK to call remove for current key from each() */
void mapll_clear(mapll_t map); /* remove all entries */
void mapll_dispose(mapll_t m);

void mapll_smoke_test(bool single_thread);

#endif /* MAPLL_H */
